home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / stat.swf / scripts / DefineButton2_224 / BUTTONCONDACTION on(press).as
Encoding:
Text File  |  2006-06-13  |  788 b   |  33 lines

  1. on(press){
  2.    var i = 0;
  3.    while(i < macroCheck.length)
  4.    {
  5.       if(macroCheck[i] == 0)
  6.       {
  7.          _global.pagePos = 0;
  8.          loadHiScores();
  9.          return undefined;
  10.       }
  11.       i++;
  12.    }
  13.    var key = "rocket";
  14.    myVars = new LoadVars();
  15.    ffdata = "save|" + _root.i_name.text + "|" + _root.i_code.text + "|" + _global.finalTime + "|" + _global.gameId;
  16.    encrypted = "";
  17.    var i = 0;
  18.    var j = 0;
  19.    while(i < ffdata.length)
  20.    {
  21.       if(j >= key.length)
  22.       {
  23.          j = 0;
  24.       }
  25.       encrypted += String.fromCharCode((ffdata.charCodeAt(i) ^ key.charCodeAt(j)) + 1);
  26.       i++;
  27.       j++;
  28.    }
  29.    myVars.ffdata = encrypted;
  30.    myVars.sendAndLoad(_global.servletUrl,myVars,"POST");
  31.    myVars.onLoad = showHiScoreSaveResult;
  32. }
  33.